/**
 * Copyright © 2011 Creativor Studio.
 * About license information, please see LICENSE.txt.
 */
package org.creativor.rayson.demo.server;

import org.creativor.rayson.api.Session;
import org.creativor.rayson.exception.RpcException;
import org.creativor.rayson.server.RpcRequestContext;

/**
 * 
 * @author Nick Zhang
 */
public class DemoServiceImpl implements DemoService
{
	@Override
	public String echo(String message) throws NullPointerException
	{
		// throw new NullPointerException("eof");
		Session session = RpcRequestContext.getSession();
		//System.out.println("RPC session: " + session.toString());
		return message;
	}
	
	@Override
	public int getInt() throws RpcException
	{
		return 345;
	}
	
	@Override
	public int[] getIntArray()
	{
		// TODO Auto-generated method stub
		return null;
	}
	
	@Override
	public Integer getInteger()
	{
		// TODO Auto-generated method stub
		return null;
	}
	
	@Override
	public void voidMethod()
	{
		// TODO Auto-generated method stub
		
	}
	
	@Override
	public boolean isSupportedVersion(Session session)
	{
		return true;
	}
	
}
